import { http } from "@/utils/request";

/*Children*/
export interface Children {
  id: string;
  name: string;
  picture: string;
  children: Children;
  goods: Goods;
}

/*Goods*/
export interface Goods {
  id: string;
  name: string;
  desc: string;
  price: string;
  picture: string;
  orderNum: number;
}

/*tsModel5*/
export interface Category {
  id: string;
  name: string;
  picture: string;
  children: Children[];
  goods: Goods[];
}

export const getCategoryApi = (): Promise<Category[]> => {
  return http.get<Category[]>({
    url: "/home/category/head",
  });
};
